package com.gonsin.gview.common.config;

import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.Column;
import java.util.List;

@Getter
@Setter
public class GViewResourceProperties implements Cloneable {

    @ApiModelProperty("登录页标题")
    private String title;

    @ApiModelProperty("登录页副标题")
    private String titleEn;

    @ApiModelProperty("左上角logo url 图标图片地址")
    private String logoUrl;

    @ApiModelProperty("Favicon 图标图片地址")
    private String faviconUrl = "/favicon.ico";

    @ApiModelProperty("登录页背景图")
    private String loginBackground = "/img/bg.jpg";

    @ApiModelProperty("登录页面图标 图片地址")
    private String loginBackgroundIconUrl;

    @ApiModelProperty("网页上的备案内容")
    private String copyRight = "Copyright 2023 All Rights Reserved.&ensp;";

    @ApiModelProperty("网页上的备案内容（可点击跳转）")
    private String copyRightInfo = "版权所有：";

    @JsonIgnore
    @ApiModelProperty("ssl证书key文件路径")
    private String sslKeyFilePath;

    @JsonIgnore
    @ApiModelProperty("ssl证书pem文件路径")
    private String sslPemFilePath;

    @ApiModelProperty("默认用户名")
    private String defaultUsername;

    @ApiModelProperty("默认密码")
    private String defaultPassword;

    @ApiModelProperty("API描述内容")
    private String apiDescription;

    @ApiModelProperty("API版本")
    private String apiVersion;

    @Override
    public GViewResourceProperties clone() {
        GViewResourceProperties pp = new GViewResourceProperties();
        pp.setLoginBackgroundIconUrl(this.loginBackgroundIconUrl);
        pp.setLoginBackground(this.loginBackground);
        pp.setSslKeyFilePath(this.sslKeyFilePath);
        pp.setTitle(this.title);
        pp.setTitleEn(this.titleEn);
        pp.setSslPemFilePath(this.sslPemFilePath);
        pp.setFaviconUrl(this.faviconUrl);
        pp.setCopyRight(this.copyRight);
        pp.setApiDescription(this.apiDescription);
        pp.setApiVersion(this.apiVersion);
        pp.setLogoUrl(this.logoUrl);
        return pp;
    }


}
